home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-21 | 101.2 KB | 1,848 lines |
- ========================================================================
- INDEX.TXT -- a Listing of all Procedures and UDFS contained in
- LIB211.ZIP.
-
- Updated: 12/22/1993
- ========================================================================
-
- ========================================================================
- PROC.PRG -- The MAIN PROCEDURE File
- ========================================================================
-
- ----------------------------------
- MESSAGE/SCREEN PROCESSING ROUTINES
- ----------------------------------
- PrintErr -- used to display a "standard" error message for printer
- errors (is it on, online, out of paper?).
- Usage: do PrintErr
- Open_Screen -- Used to add texture to the background for an opening
- screen or menu.
- Usage: do Open_Screen
- NewBack -- Gives a different texture to the background. Flashy,
- works with screens up to 50 lines (VGA50).
- Usage: do NewBack
- JazClear -- Performs a nice center to edge of screen clear (using a
- box) ...
- Usage: do JazClear
- Wipe -- performs a left-to-right wipe of a window. Nice effect.
- Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
- Center -- used to center text anywhere on the screen (optional
- colors).
- Usage: do Center with <nRow>,<nWidth>,"<cColors>",;
- "<cText>"
- ProgBar -- Monitor program activity, so user does not get worried
- that the machine went into limbo. A graphic version of
- what the "MONITOR" procedure in SCREEN.PRG does.
- Usage: Do ProgBar with <nQuan>,"<cWindCol>",;
- "<cFillCol1>","<cFillCol2>",;
- "<cMessage>",<nWindWidth>
- Shadow -- Used for windows/boxes to display a shadow, giving 3-D
- effect.
- Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
- VPick() -- Multiple-item Picklist -- this routine will allow you to
- create a simple vertical picklist of items, returning the
- first letter of the option selected, or a null string if
- the user pressed <Esc>.
- Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
- "<cTitle>","<cMessage>",<lShadow>,<cColor>)
- HPick() -- Very much like VPICK() above, but does a Horizontal
- Picklist.
- Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
- "<cTitle>","<cMessage>",<lShadow>,<cColor>)
- ScrnHead() -- Screen header -- gives three-D border-like effects.
- Usage: ScrnHead(<cColor>,<cText>[,<nStyle>])
- Surround() -- Will display text centered on the screen, surrounded by a
- border (3-D). Giving a default of 0 will center top to
- bottom as well as left to right (automatic).
- Usage: Surround(<nRow>,<cColor>,<cText>[,<nStyle>])
- Alert() -- Gives an alert dialog box on the screen, with an "OK"
- button at the bottom. Three-D in effect. Message may be
- up to 254 characters. Defaults to border style 1, color
- defaults to grey.
- Usage: Alert(<cTitle>,<cMessage>,<cColors>[,<nStyle>])
- ErrorMsg() -- Used to display an error, similar to Alert, but the title
- will display the word "ERROR", followed by an optional
- number.
- Usage: ErrorMsg(<cError#>,<cMessage>,<cColor>[,<nStyle>])
- YesNo() -- Yes/No dialog box -- has two buttons at bottom of the
- box. Text can be up to 254 characters for message.
- Color defaults to grey, border defaults to style 1.
- Usage: YesNo(<lDefault>,<cWhere>,<cTitle>,<cMessage>,;
- <cColor>[,<nStyle>])
- Bord3D -- 3-D Border routine, requires four corner coordinates,
- color, and style.
- Usage: Do Bord3d with <nTop>,<nLeft>,<nBottom>,<nRight>,;
- <cColor>,<nStyle>
- YNC() -- Yes/No/Cancel dialog box, much as YesNo() above, but with
- three buttons. Due to differences, parameter passed and
- return value are character, rather than logical.
- Usage: YNC(<cDefault>,<cWhere>,<cTitle>,<cMessage>,;
- <cColor>[,<nStyle>])
-
- -------------------------
- COLOR PROCESSING ROUTINES
- -------------------------
- SetColor -- Sets colors to contents of a memvar to handle various
- parts of the screen.
- Usage: do SetColor with <cColorVar>
- ReColor -- Restores colors to those held in a string of the form
- returned by SET("ATTRIBUTE").
- Usage: Do ReColor with <cColors>
- ColorBrk() -- Returns one of three portions of a color variable as used
- in many of my own routines (YESNO, etc.). Used for
- explicitly setting colors.
- Usage: ColorBrk(<cColorVar>,<nField>)
- FBClrBrk() -- Returns either the foreground or the background (FB) of a
- color memory variable or string.
- Usage: FBClrBrk(<cType>,<cColorVar>)
- BackColor() -- Same, from COLOR.PRG for use with all 3-d Dialog/screen
- routines.
-
- ----------------------------
- STRING MANIPULATION ROUTINES
- ----------------------------
- AllTrim() -- Trims both sides of a character field/memvar.
- Usage: AllTrim(<cString>)
- Justify() -- This is moved here for use in other routines from
- STRINGS.PRG.
- Usage: Justify(<cString>,<nWidth>,<cType>)
- State() -- This is used for validation of a STATE (two letter) code
- (returns .t. or .f.) -- useful for data entry.
- Usage: State(<cState>)
- WordWrap() -- Routine copied here from STRINGS.PRG for use with YesNo5
-
- ----------------------
- DATE HANDLING ROUTINES
- ----------------------
- DateText() -- Convert date to Month Day, Year format.
- Usage: DateText(<dDate>)
- DateText2() -- As above, adds day of week (DoW, Month Day, Year).
- Usage: DateText2(<dDate>)
- Age() -- Returns the age of someone as of DATE(), given their
- birthdate.
- Usage: Age(<dDate>)
-
- --------------
- MISC. ROUTINES
- --------------
- SetPrint -- Used to setup the printer memory variables for a print
- job.
- Usage: do SetPrint
- DosRun() -- Used to execute a DOS command/program from inside dBASE,
- handles windows and such by restoring them when done.
- Usage: DosRun(<cCmd>)
- ScrnRpt() -- Shows a dBASE Report on screen, and pauses when the
- screen is full.
- Usage: ScrnRpt(<cRpt>)
- SetMouse -- NEWNEWNEWNEW -- Version 2.0 specific. Used to toggle
- mouse on/off handy with ON KEY definition. Requires
- public memvar c_Mouse (will create if not already there).
- Usage: Do SetMouse
- SwitchLib() -- Changes the current library file to another. Useful when
- doing quick changes to execute a function/file in another
- library.
- Usage: SwitchLib(<cNewLib>)
- VerLevel() -- Used to return numeric value of current version of dBASE
- or RUNTIME. Useful with those version specific routines.
- Usage: VerLevel()
-
- ========================================================================
- LIBRARY FILES
- ========================================================================
- The following files are the 'library' files that contain all routines in
- this system not contained in PROC.PRG. Please notice that some
- functions which are used in specific LIBRARY files (such as
- NAVIGATE.PRG, which uses some of the functions in TRIG.PRG) are
- duplicated in some of the other library files. This was done to make
- life easier on the programmer. Since dBASE IV, 1.5 (and later) does not
- allow multiple library files (although one can hope for such a feature
- in future editions), we are stuck having to duplicate some routines.
-
- ------------------------------------------------------------------------
- SCREEN.PRG -- Screen Handling
- ------------------------------------------------------------------------
- Radio() -- This routine creates a "radio-button" routine. You can
- have up to four options. Returns # of item chosen ...
- Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>",;
- "<cTxt2>","<cTxt3>","<cTxt4>","<cTitle>",;
- "<cColor>")
- CheckBox -- This routine does a "CheckBox" much like Windows/Mac type
- software, with up to four options. NOTE -- the items
- marked in the format must be a) logical, and b) fields/
- memvars.
- Usage: Do CheckBox with <nULRow>,<nULCol>,<cTitle>,;
- <cColor>,<lChk1>,<cTxt1>[,<lChk2>,;
- <cTxt2>][,<lChk3>,<cTxt3>] ... to 9
- MenuPad() -- Used to define menu pad and popup bars as a specific
- length. Function will truncate if longer than needed,
- and will pad with spaces otherwise.
- Usage: MenuPad("<nChoice>",<nLength>)
- Banner() -- Used to display a scrolling "banner" message on the
- screen.
- Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>",;
- "<cColor>")
- SeeMatch() -- Displays instant lookup match on a field in a shadowed
- box.
- Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",;
- <nULRow>,<nULCol>,<nBRRow>,<nBRCol>,;
- "<cColor>")
- MsgExp() -- Used to display a message (or an error message),
- centered on the screen. Does not use the "(Press Space)"
- bits that dBASE uses on an error message ... The message
- and the line on which it is displayed will be the same
- color.
- Usage: MsgExp("<cExp>")
- ProgBar2 -- Same as PROGBAR in PROC.PRG, but a bit simpler to use.
- Usage: Do ProgBar2 with <nQuan>,"<cWindCol>",;
- "<cFillCol2>","<cFillCol2>"
- MovePad -- Moves menu pad on selection of a letter.
- Usage: Do MenuPad with <cLetter>,<lSelect>,<cChoices>
- Monitor -- Displays a box, showing total records in database -- is
- designed to be used in a system that does a record-by-
- record update, so the user knows something is happening.
- You need to add code to display actual record numbers as
- the task is happening.
- Usage: do Monitor with "<cText>","<cColors>"
- Monitoroff -- Cleanup for Monitor procedure above.
- Usage: do MonitorOff
- NewBorder() -- This can be used to change your current border setting to
- one of a set of pre-defined borders. It will also set a
- public memvar c_Border to the same border setup string,
- and returns the 'current' border string.
- Usage: NewBorder("<cStyle>")
- VidRow() -- Returns the absolute row coordinate on a screen, ignoring
- active windows (which can be frustrating at times).
- REQUIRES: VDCURSOR.BIN
- Usage: VidRow()
- VidCol() -- Returns the absolute column coordinate on a screen,
- ignoring active windows ...
- REQUIRES: VDCURSOR.BIN
- Usage: VidCol()
- PwdMask() -- Used to obtain a password from a user, with a programmer
- defineable mask character (default is asterisk). REQUIRES
- VDCURSOR.BIN
- Usage: PwdMask(<cField>[,<nMaskChar>])
- MultiPick -- Used for a checkbox routine, using a two-column array.
- REQUIRES: JPMOUSE.BIN,MUSCLICK.BIN,VDCURSOR.BIN
- Usage: do MultiPick with <cArray>,<nDown>,<nLast>,;
- <nRows>,<nLength>[,<cColors>;
- [,<cCheck>]]
- SMultPick -- Subroutine of MultiPick -- used to handle a display loop.
- Usage: doSMultPick
- YesQuit() -- Subroutine for MultiPick.
- Usage: YesQuit()
- YNMouse() -- Mouseable Yes/No Dialog Box. REQUIRES MUSCLICK.BIN
- Usage: YnMouse(<cColors>,<cP1>[,<cP2>...][,<lYes>])
- CWnSize() -- Returns a string of four characters (chr() values) +1 for
- the coordinates of the current window/screen.
- REQUIRES: VDCURSOR.BIN
- Usage: cWnSize()
- nWBSrch() -- Subroutine for cWnSize() above.
- CWnDecode() -- Used to return numeric values based on CWNSIZE() above.
- Usage: cWnDecode(<cWnString>,<cEdge>|<nPos>)
- SetBorder -- Brings up a picklist and sample of possible borders from
- routine NEWBORDER() above. Allows user to select borders
- for use in routines. Escaping or using left/right arrows
- returns to original border selection (from before calling
- routine). NOTE: THIS WILL ONLY WORK IN dBASE IV, 2.0 (or
- later), due to use of ON POPUP command ...
- Usage: Do SetBorder with <cColor>
- DrawIt -- Routine used with SetBorder to draw sample area in window
- Usage: Do DrawIt
- Wait4Key() -- Used to deal with a read-timeout. Wait for <nSeconds>, if
- no keypress, abort the read.
- Usage: @... get <field> when Wait4Key(<nSeconds>)
- JazFill -- Used to clear out/redisplay a section of the screen with
- chr(176) in a specific set of colors (there are three
- options). Useful for backgrounds for popups/picklists and
- things.
- Usage: do JazFill with <nBegRow>,<nBegCol>,<nEndRow>,;
- <nEndCol>,<nSpeed>,<nColoSet>
- NewBack -- Creates a textured background different from the one in
- PROC.PRG, in that it uses three characters (ascii 176,177
- and 178) to do this. It's pretty fast.
- Usage: Do NewBack
- Warning() -- Displays a message at the bottom of the screen.
- WARNING: Clears out bottom of your screen, suggest
- using SAVE/RESTORE SCREEN.
- Usage: Warning(<cMsg1>[,<cMsg2>[,<cMsg3>[,<cMsg4>;
- [,<cMsg5>]]]])
- Frame() -- Accepts up to three lines of text and displays in a
- double-line border on screen.
- Usage: Frame(<nBegRow>,<nBegCol>,<nEndRow>,<nEndCol>,;
- <cText1>,<cText2>,<cText3>,<cColor>,;
- <lCenter>)
- Shade() -- A shadow routine.
- Usage: Shade(<nBegRow>,<nBegCol>,<nEndRow>,<nEndCol>)
- BurstWin() -- Creates an exploding pseudo-window, with ASCII 177
- as a textured-background.
- Usage: BurstWin(<nBeginRow>,<nBeginCol>,<nEndRow>,;
- <nEndCol>,<nStep>,<cColor>)
-
- ------------------------------------------------------------------------
- COLOR.PRG -- Color Processing
- ------------------------------------------------------------------------
- AttriByte() -- Returns the attribute byte of a dBASE Color code.
- Usage: AttriByte("<cCode>")
- ColorName() -- Converts an attribute value for an area to the name of
- the corresponding color combination.
- Usage: ColorName(<nAttr>)
- ColorCode() -- Given a color attribute byte, returns dBASE color code.
- Usage: ColorCode(<nAttr>)
- ColorOf() -- Returns the color of attributes in dBASE, as currently
- set.
- Usage: ColorOf("<cArea>")
- NormColors()-- Returns the 'normal' portion of a color string.
- Usage: NormColors(<cColor>)
- HighColors()-- Returns the 'highlight' portion of a color string.
- Usage: HighColors(<cColor>)
- BordColors()-- Returns the 'border' portion of a color string.
- Usage: BordColors(<cColor>)
- OppColor() -- Returns a color string contrasting nicely with the one
- given as a parameter. Basically inverts the color passed
- to it.
- Usage: OppColor(<cColor>)
- ForeColor() -- Returns foreground part of color string.
- Usage: ForeColor(<cColor>)
- BackColor() -- Returns background part of color string.
- Usage: BackColor(<cColor>)
- Bright() -- Converts a dBASE Color Attribute to a bright (+)
- foreground.
- Usage: Bright(<cAttrib>)
- Dim() -- Converts a bright dBASE Color Attribute to it's
- non-bright (no +) foreground.
- Usage: Dim(<cAttrib>)
- Blink() -- Converts a dBASE Color Attribute to a blinking (*)
- foreground.
- Usage: Blink(<cAttrib>)
- NoBlink() -- Removes blinking foreground from a dBASE Color
- attribute.
- Usage: NoBlink(<cAttrib>)
-
- ------------------------------------------------------------------------
- STRINGS.PRG -- Character String Processing
- ------------------------------------------------------------------------
- Proper() -- Converts text to "proper" case (upper/lower case, handles
- contractions, Mc, Mac, etc.). Useful for names (converts
- first letter to upper case, the rest to lower, except as
- above).
- Usage: Proper("<cArg>")
- Dots() -- Used to pad a field with dots (dot leader, trailer ...)
- Usage: Dots(<cFld>,<nLength>,"<cType>")
- cType must be L (left), C (center), or R (right)
- CutPaste() -- Used to Cut a string and Paste another in it's place.
- It's an easier way to use the STUFF() function.
- Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
- LastWord() -- Used to return the last "word" of a string of characters
- (words being bracketed by spaces).
- Usage: LastWord(<cString>)
- VStretch() -- Displays a long character field (254 char) on screen,
- with wrap-around, and handles proper word-breaks - you
- give dimensions for where you want it displayed (window).
- Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,;
- <nBRCol>)
- AtCount() -- Returns the number of times a string is found in another.
- Usage: AtCount(<cFindStr>,<cBigStr>)
- IsAlNum() -- If first character of string is alphabetic or digit,
- returns .t., otherwise returns .f..
- Usage: IsAlNum(<cChar>)
- IsAscii() -- If first character is in ASCII (normal, not extended)
- character set, returns .t., otherwise returns .f..
- Usage: IsAscii(<cChar>)
- IsCntrl() -- If first character is a delete or control character,
- returns .t., otherwise returns .f..
- Usage: IsCntrl(<cChar>)
- IsDigit() -- If first character is a digit, returns .t..
- Usage: IsDigit(<cChar>)
- IsPrint() -- If first character is a printing character (space through
- chr(126), returns .t..
- Usage: IsPrint(<cChar>)
- IsXDigit() -- If first character is possible hexadecimal digit, returns
- .t..
- Usage: IsXDigit(<cChar>)
- IsSpace() -- Returns .t. if first character is space, tab, carriage
- return, line feed, vertical tab, or formfeed.
- Usage: IsSpace(<cChar>)
- Name2Label()-- Returns a name held in five fields as a single field for
- the purpose of printing in a label.
- Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
- <cMidName>,<cLastName>,<cSuffix>)
- StrpBrk() -- Search string for first occurrence of any specific
- character(s).
- Usage: StrpBrk(<cCharSet>,<cBigStr>)
- StrRev() -- Reverse a string.
- Usage: StrRev(<cAnyStr>)
- Strip2Val() -- Strip characters from the left until reaching one that
- might begin a numeric value ...
- Usage: Strip2Val(<cString>)
- StripVal() -- Strip characters until reaching one that is NOT part of a
- number.
- Usage: StripVal(<cString>)
- ParseWord() -- Finds first word in a character string.
- Usage: ParseWord(<cW>)
- StripWord() -- Removes first word in character string.
- Usage: StripWord(<cW>)
- Plural() -- Returns the "plural" of a noun. This will fit most cases,
- but not all, as English has too many exceptions.
- Usage: Plural(<nItems>,"<cNoun>")
- StrComp() -- Compares the contents of two strings.
- Usage: StrComp(<cStr1>,<cStr2>)
- StrOccur() -- Calculates the number of occurences of a string in
- another, works for character memvar/field, and memo
- fields.
- Usage: StrOccur(<cInString>,<cFindString>)
- NumOccur() -- Calculates the number of occurences of a string in
- another.
- Usage: NumOccur(<cInString>,<cFindString>)
- ReplMemo() -- Globally searches and replaces a string with another
- string in a character field/memvar or memo field.
- Usage: ReplMemo(<cSource>,<cCurrStr>,<cNewStr>)
- MemStuff() -- Replaces a specific string in a character string, by
- another.
- Returns the resultant string.
- Usage: MemStuff(<cSource>,<cCurrStr>,<cNewStr>)
- Stub() -- Returns a specific number of characters from a given
- string, adding characters in cIn to the end of it.
- Usage: Stub(<cString>,<nIn>,<cIn>)
- FirstMem() -- Capitalizes the first character of all the words in the
- string passed as a parameter, returns resultant string
- (unless a memo, in which case, returns a .T.)
- Usage: FirstMem(<cInStr>)
- FirstCap() -- Capitalizes the first character of a string.
- Usage: FirstCap(<cInString>)
- StripND() -- Strips non-digit characters from a character string,
- returning a string containing only digits.
- Usage: StripND(<cNumArg>)
- Strip() -- Strips each occurance of the passed string of one or
- more characters from a character string.
- Usage: Strip(<cVar>,<cArg>)
- WordWrap -- A routine to handle wrapping text within a specified
- width.
- Usage: do WordWrap with <nRow>,<nCol>,<cText>,<nWidth>
- BreakName() -- This returns a specified part of a name, such as the
- last name, of a name originally held in a single string.
- Usage: BreakName(<cName>[,<cPart>])
- NamePart() -- Guesses a portion of a name, based on <cPart>. Used with
- BreakName() above.
- Usage: NamePart(<cName>,<cPart>)
- NameMark() -- Guesses portion of a name, based on <cPart>. Used with
- MarkLine().
- Usage: NameMark(<cName>,<cPart>,<cEnd>)
- MarkLine() -- Presents a string with the cursor at a given position in
- the string. Allows user to move cursor to a new position
- in the string.
- Usage: MarkLine(<cLine>[,<nPos>])
- DeCode() -- Decodes a string encoded with EnCode() below. Used for
- simple password protection.
- Usage: DeCode(<cInput>)
- EnCode() -- Encodes a string, can be decoded with DeCode() above.
- Used for simple password protection.
- Usage: EnCode(<cInput>)
- ExEqual() -- EXactly Equal. Used to test two memvars for an exact
- match.
- Usage: ExEqual(<cInput1>,<cInput2>)
- Str_Edit() -- Used to strip unwanted characters from an input string.
- Usage: Str_Edit(<cInput>,<cBadChars>)
- CapFirst() -- Used to capitalize the the first letter of words,
- with "some intelligence" as the author puts it.
- Usage: CapFirst(<cInString>)
-
- ------------------------------------------------------------------------
- CONVERT.PRG -- Numeric Conversions/calculations
- ------------------------------------------------------------------------
- Roman() -- Function to return a Roman Numeral based on input of an
- Arabic.
- Usage: Roman(<nArabic>)
- Arabic() -- Opposite of Roman (takes Roman Numeral provided, returns
- Arabic).
- Usage: Arabic("<cRoman>")
- Factorial() -- Does what it sounds like, it returns the factorial of a
- value.
- Usage: Factorial(<nNumber>)
- IsPrime() -- Determines if the argument passed is a prime positive
- integer.
- Usage: IsPrime(<nNumber>)
- BankRound() -- Rounds numeric argument to given # of places using
- "Banker's rule."
- Usage: BankRound(<nNumber>,<nPlaces>)
- Num2Str() -- Number to String.
- Usage: Num2Str(<nNumber>)
- Dec2Hex() -- Decimal to Hexadecimal conversion.
- Usage: Dec2Hex(<nDecimal>)
- Hex2Dec() -- Hexadecimal to Decimal conversion.
- Usage: Hex2Dec(<cHex>)
- Hex2Bin() -- Hexadecimal to Binary conversion.
- Usage: Hex2Bin(<cHex>)
- Bin2Hex() -- Binary to Hexadecimal conversion.
- Usage: Bin2Hex(<cBin>)
- Dec2Oct() -- Decimal to Octal conversion.
- Usage: Dec2Oct(<nDec>)
- Oct2Dec() -- Octal to Decimal conversion.
- Usage: Oct2Dec(<xOct>)
- Cash2Check()-- Converts a number of dollars and cents to a string of
- words.
- Usage: Cash2Check(<nCash>)
- Num2Words() -- Converts an integer to a string of words.
- Usage: Num2Words(<nNum>)
- Thou2Words()-- Converts a positive integer less than 1000 to a string of
- words.
- Usage: Thou2Words(<nNum>)
- Ord() -- Converts an integer to ordinal representation.
- Usage: Ord(<nNum>)
- Num2Word() -- Converts an integer to a string of words -- self-
- contained function, does not call other functions.
- Usage: Num2Word(<nValue>)
- Num2Real() -- Converts a number to the ASCII representation of its
- storage in IEEE 8-byte real format.
- Usage: Num2Real(<nNum>,<nExp>)
- Dec2Bin() -- Decimal to Binary conversion.
- Usage: Dec2Bin(<nNum>,<nPlaces>)
- Frac2Bin() -- Converts the fractional part of a decimal number to a
- character string giving its ASCII binary representation.
- Usage: Frac2Bin(<nNum>,<nPlaces>)
- Bin2Dec() -- Converts a string containing a binary value to its
- numeric (decimal) equivalent.
- Usage: Bin2Dec(<cStr>)
- Dec2Mkd() -- Converts numeric to eight chr() values in array. (Roughly
- equivalent to MDK$() in BASIC)
- Usage: Dec2Mkd(<nVar>,<cName>)
- Dec2Mki() -- Converts an integer in range -32,768 to +32,767 to two
- chr() values equivalent to the two bytes created by the
- BASIC MKI$().
- Usage: Dec2Mki(<nInt>,<cName>)
- Dec2Mkl() -- Converts integer to four chr() values in array.
- Equivalent to MKL$() in BASIC.
- Usage: Dec2Mkl(<nInt>,<cName>)
- Dec2Mks() -- Converts numeric value to four chr() values in array.
- Equivalent to MKS$() in BASIC.
- Usage: Dec2Mks(<nVar>,<cName>)
- Dec2MSks() -- Convert numeric to four CHR() values in array. Uses
- obsolete MicroSoft format.
- Usage: Dec2MSks(<nVar>,<cName>)
- Mkd2Dec() -- Convert eight bytes storing an IEEE long real value
- (similar to CVD() function in BASIC)
- Usage: Mkd2Dec(<c1>,...,<c8>)
- Mki2Dec() -- Convert two bytes storing a signed short integer to
- decimal equivalent. Similar to CVI() in BASIC.
- Usage: Mki2Dec(<c1>,<c2>)
- Mkl2Dec() -- Convert four bytes storing a signed long integer.
- Similar to CVL() in BASIC.
- Usage: Mkl2Dec(<c1>,<c2>,<c3>,<c4>)
- Mks2Dec() -- Converts four bytes storing an IEEE Short real value.
- Similar to CVS() in BASIC.
- Usage: Mks2Dec(<c1>,<c2>,<c3>,<c4>)
- MSks2Dec() -- Converts four bytes storing an old-style Microsoft short
- real value to decimal. Similar to CVS() in BASIC.
- Usage: MSks2Dec(<c1>,<c2>,<c3>,<c4>)
- Ordinal() -- Returns an ordinal string for a positive integer < 100.
- For values greater than this, use Num2Words(), and use
- this for the values < 100.
- Usage: Ordinal(<nNum>)
-
- ------------------------------------------------------------------------
- DATES.PRG -- Date Handling Routines
- ------------------------------------------------------------------------
- DateText3() -- As DateText() and DateText2() in PROC.PRG, returns:
- Month, Year.
- Usage: DateText3(<dDate>)
- Age2() -- Returns the whole number of years between two dates.
- Usage: Age2(<dDate>,<dEvent>)
- DoY() -- Day of Year -- returns "Julian" date (US Government
- version ...) -- this is the number of days a date is into
- the year (i.e., 11/14/91 = 318).
- Usage: DoY(<dDate>)
- Annivrsry() -- Checks to see if a birthday or other specific
- "anniversary" is within a range of dates.
- Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
- AddMonths() -- Returns the exact date 'N' months from given date.
- Usage: AddMonths(<dDate>,<nMonths>)
- AddYears() -- Returns the exact date 'N' Years from given date.
- Usage: AddYears(<dDate>,<nYears>)
- WeekNo() -- Returns the week number of the date (there are 52 weeks a
- year, right?).
- Usage: WeekNo(<dDate>)
- EasterDay() -- This returns the day of Easter.
- Usage: EasterDay(<nYear>) && nYear = YYYY format
- nDoW() -- Numeric Day of Week -- used to return the numeric value
- of a character day of the week, useful for some of the
- revised functions below.
- Usage: nDoW(<cDay>)
- FWDoM() -- First Working Day Of the Month -- this returns the first
- working day of the month passed to the function.
- Usage: FWDoM(<dDate>)
- LWDoM() -- Last Working Day Of the Month -- returns the last
- working day of the month passed to the function.
- Usage: LWDoM(<dDate>)
- FDoD() -- First Day of Date -- this returns the first occurrence of
- a given day of the week within a month. For example, you
- might need the first Monday of the month.
- Usage: FDoD(<dDate>,"<cDay>") (cDay = Monday, Tuesday,
- etc.)
- LDoD() -- Last Day of Date -- This returns the last occurrence of a
- given day of the week within a month. For example, you
- might need the last Monday in a month.
- Usage: LDoD(<dDate>,"<cDay>")
- LDoM() -- Last Day of Month -- this returns the last day of the
- month as a date. It's used in LDoD and LWDoM above.
- Usage: LDoM(<dDate>)
- NumDoD() -- Number of Day of Date -- this returns a specific
- occurrence of a given day of the week within a month.
- For example, you might need the 3rd Tuesday of the month.
- Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
- WDIF() -- Work Days In the Future -- this is used to return the
- date based on a number of work-days from another date.
- For example, you could find the date of the 10th work
- date from today (date()) by using date(),10 as the
- parameters in the format below. This function can use a
- HOLIDAYS database to be more accurate, but you must
- create it in a specific format (see complete function
- documentation in the file DATES.PRG).
- Usage: WDiF(<dStart>,nWDays)
- StoD() -- String to Date -- this returns a "normal" dBASE date from
- a character string containing formats of YYYYMMDD or
- YYMMDD.
- Usage: StoD("<cString>")
- Quarter() -- This function returns the "Quarter" of the year that a
- specified date is in ...
- Usage: Quarter(<dDate>)
- Dat2Jul() -- Convert dBASE date to Julian date
- Usage: Dat2Jul(<dDate>)
- Jul2Dat() -- Convert Julian date to dBASE date
- Usage: Jul2Dat(<nJulian>)
- FrstNxtMth()-- Returns the first day of next month, given a date in
- 'current' month.
- Usage: FrstNxtMth(<dDate>)
- FDoM() -- Returns the first day of the month a specific date is in.
- Usage: FDoM(<dArg>)
- FDoY() -- Returns first day of year (January 1) that a specific
- date is in.
- Usage: FDoY(<dArg>)
- LDoY() -- Returns last day of year (December 31) that a specific
- date is in.
- Usage: LDoY(<dArg>)
- QDate() -- Allows user to enter date as if using Intuit's Quicken.
- Used with WHEN clause ...
- Usage: @x,y GET <dArg> WHEN QDate(<dArg>)
- Keys: T = Today's Date
- -/_ = Day before
- +/= = Day after
- M = First day of month
- H = Last day of month
- Y = First day of year
- R = Last day of year
- digit = manual entry
- HebrewDate()-- Converts a date to corresponding date on the Hebrew
- Calendar. The date returned is the Hebrew date that
- matches the daylight hours of the given civil date; the
- Hebrew date actually starts the evening before.
- Usage: HebrewDate(<dDate>)
- CivilDate() -- Converts a Hebrew calendar date to corresponding date on
- the civil calendar.
- Usage: CivilDate(<cDate>)
- Date2Heb() -- Used in HebrewDate() above, to perform the actual
- conversion.
- Usage: Date2Heb(<dDate>)
- Kebiah() -- Kebiah of a year, using Arthur Spier's Notation. Tells
- whether the year in the Hebrew Calendar is defective,
- regular or excessive and whether or not a leap year.
- Usage: Kebiah(<dRosh1>,<dRosh2>)
- Roshashana()-- Returns date of Rosh Hashanah of the given Hebrew Year.
- Usage: Roshashana(<nYear>)
- Dechiyoth() -- Adjusts date of Rosh Hashanah for the four dechiyoth
- (postponements) required to regularize the calendar and
- prevent either two days in a row of Sabbath at Yom Kippur
- or Hoshanah Rabbah being on the Sabbath.
- Usage: Dechiyoth(<dDate>,<nHours>,<nChalokim>)
- IsLeapH() -- Determines if an Hebrew year is a leap year.
- Usage: IsLeapH(<nYear>)
- NormalH -- Normalize date and numbers of hours and chalokim.
- Usage: Do NormalH with <dDate>,<nHours>,<nChalokim>
- MDY_Udf() -- This is a variation on MDY() (built-in). It displays
- dates in a nice format regardless of the Set CENTURY
- setting.
- Usage: Mdy_udf(<dDate>)
- SWorkDays() -- Returns workdays between two dates, excluding the first,
- but including the last.
- This is a shortcut version of WORKDAYS() included here.
- Usage: SWorkDays(<dDate1>,<dDate2>)
- WeekDays() -- Returns the number of days that are not Saturdays or
- Sundays within a range of dates. Excludes beginning date
- and includes ending date. Range must be less than one
- year. This does not include holidays.
- Usage: WeekDays(<dDate1>,<dDate2>)
- XWorked() -- Returns number of workdays in a stub period of 0-6 days
- beginning on the day of the week indicated. Does not
- consider holidays, treats workdays as Monday thru Friday.
- Usage: xWorked(<nxtra>,<nDow>)
- HoliCount() -- Returns number of holidays that fall in the portion of
- a calendar year ending with a given date. Always includes
- New Year's Day, transferred to the 2nd or 3rd, and July 4
- and XMas, each transferred if required to the nearest
- day not Saturday or Sunday. Other holidays are
- included (but not transferred) if their codes for the
- Holiday() function are included in the cHols argument.
- Does not include the numbers of Saturdays/Sundays in the
- value returned.
- Usage: HoliCount(<dDate>,<cHols>)
- HolXFer() -- Returns date of celebration of a holiday.
- Usage: HolXFer(<dDate>,<cDows>,<cDir>)
- WorkDays() -- Returns workdays between two dates, excluding the first
- but including the last.
- USES: HOLSYYYY.DBF (with YYYY being the year of
- interest).
- USES: MAKEHOLS() function. A copy of the MAKEHOLS.DBF
- is included with dUFLP, as a sample, which may or may
- not be useful. Read the internal documentation for
- these routines carefully.
- Usage: WorkDays(<dDate1>,<dDate2>)
- MakeHols() -- Makes a .DBF file of name "HOLSYYYY.DBF", if MAKEHOLS.DBF
- is found, where 'YYYY' in the name will be the four
- digits of the year. The resulting file contains a record
- for each non-working day of the year, sorted in order of
- date and tagged by date tag "HolDate". Returns .T. if
- successful, .F. otherwise. If the file HolsYYYY.DBF
- already exists, it will be replaced if older than
- "MAKEHOLS.DBF".
- USES: MAKEHOLS.DBF
- Usage: MakeHols(<nYear>)
- AddaHol() -- Adds a date to HolsYYYY if in correct year and not
- already included.
- USES: HOLSYYYY.DBF (see MakeHols() above)
- Usage: AddaHol(<dDate>,<nYr>,<cHolName>)
- Holiday() -- Returns the date of specific "floating" holidays for a
- given year, requires a one-letter code. See full doc in
- DATES.PRG.
- Usage: Holiday(<nYear>,<cCode>)
- Where cCode may be one of the following:
- P = President's Day
- D = Daylight Saving Time
- M = Memorial Day
- L = Labor Day
- C = Columbus Day
- S = Return to "Standard" Time
- E = Election Day
- T = Thanksgiving Day
- A = Advent 1st Sunday
- IsLeap() -- Returns .t./.f. if year is a leap year... (year in YY or
- YYYY formats)
- Usage: IsLeap(<nYear>)
- Num2Date() -- Converts dates in YYMMDD format to dBASE date format.
- Designed for use with AS/400 dates downloaded to PCs.
- Usage: Num2Date(nYyMmDd)
- Epoch() -- Adjusts a date to within 100 years after a given
- Epoch.
- Usage: Epoch(<dDate>,<xReturn>[,<nEpoch>])
-
- ------------------------------------------------------------------------
- TIME.PRG Time Processing Routines
- ------------------------------------------------------------------------
- Delay() -- Delay loop in seconds.
- Usage: Delay(<nSeconds>)
- Time2Sec() -- Convert time string to seconds.
- Usage: Time2Sec(<cTime>)
- Sec2Time() -- Convert seconds to time string.
- Usage: Sec2Time(<nSeconds>)
- DiffTime() -- Calculate difference btween two time strings.
- Usage: DiffTime(<cTime1>,<cTime2>)
- Civ2Mil() -- Convert civilian time string (i.e., "12:59 A.M.") to 24
- hour (military) time.
- Usage: Civ2Mil(<cCivilTime>)
- Mil2Civ() -- Convert military (24 hour) time to Civilian time.
- Usage: Mil2Civ(<cMilTime>)
- IsAmPm() -- Checks to see if a time string is in "Civilian" time
- format (i.e., AM/PM) -- returns a logical (.t./.f.)
- Usage: IsAmPm(<cTime>)
- AddTimes() -- Adds two time-strings together, returning a valid time
- string.
- Usage: AddTimes(<cTime1>,<cTime2>|<nHours>)
-
- ------------------------------------------------------------------------
- FINANCE.PRG -- Finance Functions
- ------------------------------------------------------------------------
- Discount() -- Compute the present value of an amount received at the
- end of a number of periods given a periodic interest
- rate.
- Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
- FuturVal() -- Compute the future value of an initial amount at compound
- interest received at a given periodic rate for a number
- of periods.
- Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
- Rate() -- Compute rate of periodic interest needed to produce a
- future value from a present value in a given number of
- periods.
- Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
- ContRate() -- Compute rate if compounding is continuous.
- Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
- NPV() -- Net Present Value of array aCashFlow[n].
- Usage: NPV(<nRate>,<nPeriods>)
- IRR() -- Internal Rate of Return, using ZeroIn().
- Usage: Irr(<fX1>,<fX2>,<n_Flag>)
- IRR2() -- Internal Rate of Return, traditional analysis of periodic
- cashflows. Returns periodic rate of return which must be
- analyzed by the user. Uses an iterative process and
- multiple answers are possible.
- Usage: Irr2(<nN>,<cFlow>,<lSw>,<nGuess>)
- FVIrr() -- Companion to Irr2(). Irr() searches the function for NPV
- for roots, while FVIrr searches the function for NFV.
- Usage: FVIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
- MIrr() -- Modified Internal Rate of Return -- employs a financial
- manager's analysis of the cost of reserve funds and a
- likely reinvestment rate for receipts. Returns periodic
- rate of return which must be annualized by the user.
- Solves directly for a unique answer.
- Usage: MIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
- XIrr() -- Internal Rate of Return not constrained by evenly-spaced
- periods of chasflow, but uses dates of transactions.
- Returns annulaized rate of return based on daily
- compounded interest. Iterative process with multiple
- answers possible.
- Usage: XIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
- FVXIrr() -- Companion to XIrr() with the search for roots of the NFV
- function. See FVIrr() above.
- Usage: FVXIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
- XMIrr() -- Modified Internal Rate of Return without the constraint
- of evenly spaced periods, uses dates of transactions and
- returns annualized rate of return based on daily
- compounded interest. Solves directly for a unique answer.
- Usage: XMIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
-
- ------------------------------------------------------------------------
- ARRAY.PRG -- Array Processing Routines
- ------------------------------------------------------------------------
- AFill() -- Fills an array with sequential elements. Useful for
- testing array processing routines.
- Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,;
- <nStep>)
- AMask() -- Returns a "mask" specifying the desired row or column of
- an array.
- Usage: AMask(<cArrayskel>,<cVar>)
- AMean() -- Mean of non-blank numeric or date values in specified
- row or column of an array.
- Usage: AMean(<cArrayskel>)
- AMax() -- Maximum non-blank numeric, date or character value in
- specified row or column of an array.
- Usage: AMax(<cArrayskel>)
- AMin() -- Minimum non-blank numeric, date or character value in
- specified row or column of an array.
- Usage: AMin(<cArrayskel>)
- AVar() -- Finds population variance of non-blank numeric or date
- values in specified row or column of a specified array.
- Usage: AVar(<cArrayskel>)
- ASeek() -- Performs a binary search in any specified ascending-
- sorted row or column of an array.
- Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
- AShuffle() -- Performs a shuffle of elements of an array randomly ...
- Usage: aShuffle(<aArray>,<nLength>)
- ABubble()-- Performs a bubble sort (slow) on an array. By telling the
- routine the number of passes, you can have it stop at a
- specific point, and obtain some of the highest or lowest
- values, without taking the time to perform a complete
- sort. To perform a complete sort, pass the same value for
- nPasses as for nLength (number of elements in array) --
- if you want a complete sort, however, you may want to
- take another look at ShellSort() below ... it's faster.
- Usage: aBubble(<aArray>,<nLength>,<nPasses>)
- ArrayRows() -- Returns number of rows (elements) in an array.
- Usage: ArrayRows(<aArray>)
- ArrayCols() -- Returns number of columns in an array.
- Usage: ArrayCols(<aArray>)
- ShellSort() -- Performs a fast sort routine on an array. This array must
- be copied into an array called: aMyArray.
- Usage: ShellSort(<nNumber>[,<nColumn>])
- aPullSort() -- Performs a sort on an array. This array must be copied
- into an array called: aMyArray. This routine is
- theoretically faster than the ShellSort() routine above,
- and definitely faster than the aBubble() routine above.
- Usage: aPullSort(<nNumber>)
- CmpArray -- Compares the contents of two arrays.
- Usage: do CmpArray with <Array1>,<Array2>,<ArIndex>
- ARec2Arr() -- Creates a public array, &aRecord.[n], initialized to the
- record format of the currently selected DBF, either blank
- or filled with the values of the current record.
- NOTE: Update requires a name for the array!
- Usage: ARec2Arr(<ArrayName>,<lBlank>)
- StackNew() -- Creates a stack (using dBASE arrays). This is not quite
- a "true" stack, as it requires an upper limit.
- Usage: StackNew(<cName>,<nSize>)
- StackEmpty()-- Checks to see if a stack is empty.
- Usage: StackEmpty(<cName>)
- StackFull() -- Checks to see if a stack is full.
- Usage: StackFull(<cName>)
- StackPush() -- Adds an element to the top of a stack.
- Usage: StackPush(<cName>,<xElement>)
- StackPop() -- Removes an element from the top of the stack.
- Usage: StackPop(<cName>,<xElement>)
- StackTop() -- Copies top element from a stack, but does not remove it.
- Usage: StackTop(<cName>,<xElement>)
- StackDelete -- Releases stack (array) from memory.
- Usage: Do StackDelete with <cName>
-
- ------------------------------------------------------------------------
- MEASURE.PRG -- Conversion of Measurements
- ------------------------------------------------------------------------
- Kg2Lb() -- Used to convert Kilograms to Pounds.
- Usage: Kg2Lb(<nKg>)
- Lb2Kg() -- Used to convert Pounds to Kilograms.
- Usage: Lb2Kg(<nPounds>)
- Inch2Cm() -- Inches to Centimeters.
- Usage: Inch2Cm(<nInches>)
- Cm2Inch() -- Centimeters to Inches.
- Usage: Cm2Inch(<nCm>)
- Km2Mile() -- Kilometers to Miles.
- Usage: Km2Mile(<nKm>)
- Mile2Km() -- Miles to Kilometers.
- Usage: Mile2Km(<nMiles>)
- Km2Naut() -- Kilometers to Nautical miles.
- Usage: Km2Naut(<nKm>)
- Naut2Km() -- Nautical miles to Kilometers.
- Usage: Naut2Km(<nNautMiles>)
- Naut2Stat() -- Nautical miles to Statute miles (approximate).
- Usage: Naut2Stat(<nNautMiles>)
- Stat2Naut() -- Statute miles to Nautical miles (approximate).
- Usage: Stat2Naut(<nStatMiles>)
- Fahr2Cel() -- Fahrenheit to Celsius.
- Usage: Fahr2Cel(<nFahrTemp>)
- Cel2Fahr() -- Celsius to Fahrenheit.
- Usage: Cel2Fahr(<nCelTemp>)
- Gal2Ltr() -- US Gallons to Liters
- Usage: Gal2Ltr(<nGal>)
- Ltr2Gal() -- Liters to US Gallons
- Usage: Ltr2Gal(<nLiters>)
- CuFt2Gal() -- Cubic feet to US Gallons
- Usage: CuFt2Gal(<nCubicFeet>)
- Gal2CuFt() -- US Gallons to Cubic Feet
- Usage: Gal2CuFt(<nGallons>)
-
- ------------------------------------------------------------------------
- TRIG.PRG -- Trigonometric Functions
- ------------------------------------------------------------------------
- Note, all of these have the Usage: FUNC(<nX>)
-
- Secant() -- Secant of an angle X in radians.
- Cosecant() -- CoSecant of an angle X in radians.
- CoTan() -- CoTangent of an angle X in radians.
- ASec() -- Inverse Secant - angle size in radians.
- ACoSec() -- Inverse Cosecant - angle size in radians.
- ACoT() -- Inverse CoTangent
- SinH() -- Hyperbolic Sine
- CosH() -- Hyperbolic CoSine
- TanH() -- Hyperbolic Tangent
- SecH() -- Hyperbolic Secant
- CScH() -- Hyperbolic CoSecant
- CoTH() -- Hyperbolic CoTangent
- ASinH() -- Inverse Hyperbolic Sine
- ACosH() -- Inverse Hyperbolic CoSine
- ATanH() -- Inverse Hyperbolic Tangent
- ASecH() -- Inverse Hyperbolic Secant
- ACscH() -- Inverse Hyperbolic CoSecant
- ACotH() -- Inverse Hyperbolic Cotangent
- Hav() -- Haversine
- AHav() -- Inverse Haversine
-
- ------------------------------------------------------------------------
- NAVIGATE.PRG -- Navigation Routines
- ------------------------------------------------------------------------
- Correct() -- Correction of direction - adjusts direction given, in
- degrees, by a second number of degrees.
- Usage: Correct(<nDirection>,<xCorrection>)
- UnCorrect() -- Uncorrection of direction - adjusts direction given, as
- above. This is the inverse of Correct().
- Usage: UnCorrect(<nDirection>,<xUnCorr>)
- XAngle() -- Angle in degrees (<=90) at which two vectors in degrees
- intersect.
- Usage: XAngle(<nVector1>,<nVector2>)
- LeftWind() -- Effect of second vector on first.
- Usage: LeftWind(<nCourse>,<nWindFrom>)
- TailWind() -- Is the effect of second vector on first additive?
- Usage: TailWind(<nCourse>,<nWindFrom>)
- Heading() -- Heading required to make good a course.
- Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,;
- <nForce>)
- Course() -- Course made good given heading, speed, wind dir, and
- force.
- Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,;
- <nForce>)
- GndSpeed() -- Speed over the ground given heading, etc.
- Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,;
- <nForce>)
- Deg2Num() -- Degrees to numbers ... converts character description of
- degrees (Degrees Minutes Seconds: 40d50'30.2 N) to
- numeric value.
- Usage: Deg2Num("<cDms>")
- BearsDist() -- Distance to an object at the time of the second bearing.
- Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
- BearsPass() -- Distance at which an object will be when abeam given 2
- bearings.
- Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
- BearsRun() -- Distance to run until object will be abeam given two
- bearings.
- Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
- GCDist() -- Great Circle distance between 2 points given latitude and
- long. of each.
- Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
- GcCourse() -- Initial Great Circle course between two points given lat
- and long of each. (Following a 'Great Circle' requires
- course changes.
- Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
-
- ------------------------------------------------------------------------
- STATS.PRG -- Statistical Routines
- ------------------------------------------------------------------------
- Samplevar() -- Finds sample variance of specified field of the current
- database.
- Usage: SampleVar(<cField>[,<cClause>])
- Stny() -- Returns value of the standard normal distribution
- function given a number of standard deviations from the
- mean.
- Usage: Stny(<nDevs>)
- StnArea() -- Area of the standard normal distribution function between
- mean and given number of standard deviations from the
- mean.
- Usage: StnArea(<nDevs>)
- Stnz() -- Lookup table to find the values of 'z', standard
- deviations, corresponding to the most common areas inside
- a given number of tails of the normal distribution
- function.
- Usage: Stnz(<nProb>,<nTails>)
- StnDiff() -- Determines whether hypothesis that sample of a given mean
- is different from expected mean is justified.
- Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
- <nPopMean>,<nPopStd>)
- StnDevs() -- Calculates 'z', standard deviations, corresponding to any
- area of standard normal curve between mean and the
- desired z. Much slower than Stnz().
- Usage: StnDevs(<nArea>)
- TstnArea() -- Translation function to convert area to left of point
- under standard normal curve to 0 for ZeroIn().
- Usage: TstnArea(<nDevs>,<nArea>)
- ZeroIn() -- Finds a zero of a continuous function.
- Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,;
- <nMaxiter>,<n_Flag>)
-
- ------------------------------------------------------------------------
- FIELDS.PRG -- Field Processing Routines
- ------------------------------------------------------------------------
- MemoPagr() -- Used to display a memo in a window on screen, allows user
- to scroll up and down through memo.
- Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,;
- <nBRCol>)
- ScanMemo -- Used to remove hard returns in all memo fields in all
- records of a specified database.
- Usage: Do ScanMemo with "<cDbf>"
- Cut -- Used to cut to a global memvar CLIPBOARD the contents of
- a field or memvar on screen (during a read) -- can then
- be used with PASTE.
- Usage: do Cut with "<cFld>","<cScrType>"
- Copy -- Used to COPY to a global memvar CLIPBOARD the contents of
- a field or memvar on screen, so it can be used with
- PASTE.
- Usage: do Copy with "<cFld>"
- Paste -- Used to paste the contents of CLIPBOARD (global memvar)
- to the current field.
- Usage: do Paste with "<cFld>","<cScrType>"
- Blanker() -- Used to blank out a numeric field upon input of a valid
- numeric item. Useful with GETs ...
- Usage: Blanker()
- GetRange() -- Get a range for use with "SET KEY" or "SET FILTER"
- commands, works with character, numeric, float and date
- types.
- Usage: GetRange(<cTitle>,<xPara1>,<xPara2>,<cPicture>,;
- <nStartRow>,<cColor>[,<cStyle>])
- FldWidth() -- Return the width of a field, without having to load the
- database structure into a file ...
- Usage: FldWidth(<nField>)
- FldDec() -- Returns the decimal position in a numeric field.
- Usage: FldDec(<nField>)
- PopMemo -- Displays a memo in a popup/picklist. Can be assigned to
- a function key.
- Usage: do PopMemo with <nTop>,<nLeft>,<nBottom>,;
- <nRight>,<cMemoName>
- FldName() -- Changes the name of a field in specified dbf. Uses
- low-level file functions.
- Usage: FldName(<cDBF>,<nField>,<cNewName>)
- IsMatch() -- Can be used to check for a match of a memvar or field
- against the current database.
- Usage: IsMatch(<cAlias>,<xValue>[,<nRecNo>[,<cOrder>]])
-
- ------------------------------------------------------------------------
- FILES.PRG -- File Handling Routines
- ------------------------------------------------------------------------
- AllTags -- Used to bring up a popup/picklist of MDX tags ... can be
- assigned to a function key.
- Usage: do AllTags with <nULRow>,<nULCol>
- RedoTags -- Used to deal with "bloated" MDX files. This will delete
- old tags and recreate the MDX file, reducing the size of
- it, and making access faster.
- Usage: do RedoTags with "<cDBF>" && note, do not include
- && ext.
- AutoRedo -- Used to bring up a picklist of DBF files, so that you (or
- the user) can choose which to redo the tags for.
- Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,;
- <cColor>)
- PrntTags -- Used to print a list of tags/expressions to either the
- printer or a file for a specific database.
- Usage: do PrntTags with "<cDBF>"
- ListDBFs -- Used to create a simple database (DBFS.DBF) containing
- the names of all databases in the current directory.
- Usage: do ListDBFs
- ReCompile() -- Recompiles all dBASE source-code files.
- Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
- MakeDbf -- Makes an empty DBF.
- Usage: Do MakeDbf with <cFileName>,<aArray>
- MakeDbf2 -- Makes an empty DBF, assumes array aMakeDBF[n,5].
- Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
- MakeStru() -- Makes an empty dBASE Structure EXTENDED file and returns
- its root name.
- Usage: MakeStru()
- MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE
- print redirection. User/programmer may specify to save
- database in directory specified by DBTMP (DOS Environment
- variable) or in the current directory.
- Usage: MakeStru2(<lDBTmp>)
- TempName() -- Returns a name that can be used for a file of given
- extension without conflicting with names of existing
- files. If extension is 'DBF', assures that no .DBT or
- .MDX of that name exists as well.
- Usage: TempName(<cExtension>,<lDBTmp>)
- FileMove -- Used to handle data entry/editing, allowing the user to
- move through the database by pressing specific keys. See
- internal docs for more detail.
- Usage: do FileMove with <nKey>
- Used() -- Checks to see if a database is currently in use --
- returns a logical.
- Usage: Used("<cFile>")
- MDXByte() -- Used to set the MDX Byte in a DBF header ON or OFF.
- Usage: MDXByte(<cDBFPath>,<cOnOff>)
- aDir() -- Creates a public array GADIR[n,4] containing directory
- information. It is limited to 292 files or less,
- depending on the memory available. Requires SEARCH.BIN.
- Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
- DBFDir() -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
- directory information. Uses the DOS 5.0 DIR command, and
- requires DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS
- VERSIONS OF DOS.
- Usage: DBFDir(<cPathSkel>,<lHidSys>)
- ParsPath() -- Extracts and returns the path from a full path file
- specification.
- Usage: ParsPath(<cFullPath>)
- TagPop -- Brings up a picklist of .MDX Tags for current database,
- so user can change sequence data is listed in. Lists
- key, whether or not tag has a 'for' clause or is unique,
- and gives most (if not all) of expression for the tag.
- Usage: do TagPop with cColor,cCurTag
- AAppend() -- Appends a text file into an array. This routine is
- limited to text files of 1,170 lines, and 254 characters
- per line. The text file must be an ASCII .TXT formatted
- file. Warning -- if array already exists, it will be
- overwritten.
- Usage: AAppend(<cFileName>,<aArrayName>)
- FDel() -- Deletes a given portion of a file (text or binary) from
- the beginning of the file, end of the file, or current
- pointer position.
- Usage: FDel(<nHandle>,<nBytes>,<nStart>)
- FGetLine() -- Extracts a line of text from a text file.
- Usage: FGetLine(<cFileName>,<cLookup>[,<lCase>[,;
- <lEntire>]])
- FIns() -- Inserts specified number of nulls into a low-level file.
- See comments on FDel().
- Usage: FIns(<nHandle>,<nBytes>,<nStart>)
- GetInfo() -- Retrieves information from STATUS that you cannot get
- with the dBASE IV function SET(). Keywords are:
- WORK Number of work area currently in
- PRINT Current printer destination (PRN, NUL,
- etc.)
- ERROR Error condition set by ON ERROR
- ESCAPE Escape condition set by ON ESCAPE
- F2 to F10
- Ctrl-F1 to Ctrl-F10
- Shift-F1 to Shift-F10
- Current setting of each key as set by SET
- FUNCTION
- PAGE,LINE Line number specified by ON PAGE AT LINE
- HANDLE,<filename>
- Handle number of low-level file <filename>
- NAME,<filehandle>
- Filename of low-level file specified by
- <filehandle>
- MODE,<filehandle>
- Privilege of low-level file spec. by
- <filehandle>
- Usage: GetInfo(<cKeyWord>[,<cKeyWord2>])
- TextLine() -- Returns the number of lines of text in an ASCII Text
- file.
- Usage: TextLine(<cTextFile>)
- TLine() -- Returns a specific line in an ASCII Text File.
- Usage: TLine(<cTextFile>,<nLine>)
- TLineNo() -- Returns the line number of the phrase you are searching
- for in an ASCII Text File.
- Usage: TLineNO(<cTextFile>,<cLookup>[,<lCase])
- TempFile() -- Returns a random filename in temporary directory.
- Usage: TempFile([cFileExt])
- TempDir() -- Returns path of temporary directory as set from DOS
- (i.e., SET DBTMP=...).
- DirList() -- Displays a popup showing all directories on a drive. User
- may select from list. Returns PATH. Requires TREE command
- from DOS be in path. Optional parm to change drive ...
- Usage: DirList([<cDrive>])
- WhatDir -- Procedure used by DirList() above to extract path from
- the bar of the popup selected.
- Usage: Do WhatDir with <nBar>,<cDir>
- GRAt() -- Graphic Reverse At() -- returns position of a graphic
- line-draw character in a string.
- Usage: GRAt(<cString>)
- FF() -- FileFind -- brings up a popup of files that match a
- skeleton.
- Will Search complete drive, or a path specified. Uses
- standard DOS Wildcards (*,?).
- Usage: FF(<cFile>[,<cPath>])
- MakeStr() -- Will create an empty structure extended database.
- Usage: MakeStr(<cFilename.EXT>)
- RecChged() -- Test field values against memory variables to see if an
- on-screen display has changed from the disk-record.
- Usage: RecChged([<cAlias>])
- CopyFile() -- Copies a database, production .MDX, and .DBT (if these
- exist). This is faster than COPY TO ...
- Usage: CopyFile(<cOldFile>,<cNewFile>)
- CopyFil1() -- Works as above, with open or closed .DBF/.MDX/.DBT files.
- (Requires SET DBTRAP is set to OFF)
- Usage: CopyFil1(<cOldFile>,<cNewFile>)
- RenFile() -- Renames a .DBF/production mdx/.DBT if they exist, and
- correctly updates the .MDX header.
- Usage: RenFile(<cOldFile>,<cNewFile>)
- RenFile1() -- As above, works with open or closed .DBF.
- Usage: RenFile1(<cOldFile>,<cNewFile>)
- DelFile() -- Deletes a database, production, and memo (.DBT) in one
- swell foop.
- Usage: DelFile(<cDBFName>)
- DelMDX() -- Deletes a production index file, correctly updating the
- file header for the .DBF (avoiding error messages).
- Usage: DelMdx(<cMdxName>)
- RestMDX() -- Restore a pointer to an existing .MDX file in the
- .DBF header. Only really needed if you make a mess using
- DELMDX() above.
- Usage: RestMdx(<cMdxName>)
- MdxPoint() -- Changes the hard-coded .DBF name in an .MDX file header.
- Usage: MdxPoint(<cDBFName>,<cMdx>)
- DBFName() -- Strips the 8-character .DBF filename out of the full
- path returned by the DBF() function. Works on the
- database in USE in the current workarea.
- Usage: DBFName()
- MDXGauge() -- Indexes a database, showing a 'fuel-gauge' style
- indicator. SET DBTRAP must be off. Cleans up after itself
- with routines below.
- Usage: MDXGauge(<cDataFile>,<cMdxExpr>,<cMdxTag>,;
- [<cMdxName>,[<cClr>,[<nURow>,[<nLCol>]]]])
- Gauge() -- Used to "fill up" the gauge on screen during indexing.
- Used with MDXGauge() above.
- Usage: Gauge()
- DelGauge() -- Used to delete reference to Gauge() from the .MDX header.
- Usage: DelGauge(<cMdx>,<cTag>)
- FindTagExp() -- Finds the starting position of a specific index TAG
- expression within an .MDX header.
- Usage: FindTagExp(<nHandle>,<cMdxTag>)
- FLocate() -- Finds a string within a file, starting from the current
- position of the file pointer.
- Usage: FLocate(<nHandle>,<cSearch>,<lWantUpper>)
- FTell() -- Shorthand way of finding the current position of the file
- pointer in a file, without moving the pointer.
- Usage: FTell(<nHandle>)
- FLen() -- Finds length in bytes of a file and returns the file
- pointer to byte 0.
- Usage: FLen(<nHandle>)
- FReadI32() -- Converts a 4-byte integer to its decimal value.
- Usage: FReadI32(<nHandle>)
- MdxGaug2() -- Version of MDXGAUG (above) that allows cross-directory
- access of .DBF/.MDX files, and passing of colors.
- Usage: MdxGaug2(<cDataFile>,<cIndexExp>,<cMTag>,;
- <cMdxName>,<cClrBox>,<cClrEmp>,;
- <cClrFul>,<nURow>,<nLCol>)
- Gaug2() -- Version of GAUGE() above, that works with MDXGAUG2().
- Allows passing of bar colors ...
- Usage: Gaug2(<cClrFul>,<cClrEmp>)
- NewRec() -- This routine will recycle records, but requires that
- deleted records be a) blanked, and b) that PACK is not
- used to remove them from the file.
- Usage: NewRec()
- IsNetDir() -- Does directory (on the LAN) exist?
- Usage: IsNetDir(<drive:path>)
- Net_Err -- Network Error handling, used with IsNetDir() above.
- Usage: on error do Net_err
-
- ------------------------------------------------------------------------
- MISC.PRG -- Miscellaneous Routines
- ------------------------------------------------------------------------
- PlayIt() -- Plays a song based on parameter passed. 1 = Dirge,
- 2 = "touchdown", programmer may add more as needed ...
- Usage: PlayIt(<nSong>)
- PageEst -- Will estimate number of pages in a report, and then ask
- if you wish to generate said report ... requires three
- parameters:
- nCount = record count (may be 0, in which case procedure
- will try to count the records)
- cReport = report name, with any FOR condition you wish --
- you use a FOR condition, and give a '0' for the
- nCount parameter, the procedure will count the
- records that match the FOR (only a FOR is setup
- at the moment).
- nRecords = number of records that will print on a page.
- If you send '0', the procedure will calculate
- based on 60 records to the page.
- Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
- Permutes() -- Permutations of a number of items taken x amount at a
- time.
- Usage: Permutes(<nNum>,<nHowMany>
- Combos() -- Combinations, similar to above -- slight difference. See
- docs.
- Usage: Combos(<nNum>,<nHowMany>)
- BinLoad() -- A function used to manage .BIN files.
- Usage: BinLoad(<cBinName>)
- DialUp() -- A simple dialer routine. (No longer requires
- LOWLEVEL.BIN)
- Usage: DialUp(<cPhoneNo>)
- CurrPort() -- Returns the current port being used by the SET PRINT
- command. Requires a database (CURRPORT.DBF, one field,
- 80 characters, called CURRPRT, indexed on said field ...)
- Usage: CurrPort()
- FileLock() -- Returns a logical if an attempt to lock a file on a LAN
- was successful, displays a message otherwise.
- Usage: FileLock("<cColor>")
- RecLock() -- Returns a logical if an attempt to lock a record on a LAN
- was successful, displays a message otherwise.
- Usage: RecLock("<cColor>")
- UserID() -- Returns the userid of the current user on a LAN. Returns
- a null string if not on a LAN. ** IF USING dBASE IV, 1.1
- or less, requires USERID.BIN **
- Usage: UserID()
- DosShell -- Swaps out dBASE from memory, loads a DOS shell.
- Usage: do DosShell with <cAppName>
- IsDisk() -- Checks a disk in a disk drive to see if it's valid (door
- open, unformatted disk, etc.). ** Uses DISK.BIN **
- Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
- IsDisk2() -- As above, but also checks for write-protection.
- *** USES ISDISK.BIN ***
- Usage: IsDisk2(<cDrive>,<cColMess>,<cColErr>)
- BlankIt -- Used to act like a screen saver for dBASE. Displays a
- clock on the screen, waits for user to press <Esc> key.
- Usage: do BlankIt
- (suggest: ON KEY LABEL ALT-B DO BlankIt)
- ClockIt -- Used as part of BlankIt routine.
- Clock -- Same.
- AuxMsg() -- Will send output to a secondary monitor, if OX.SYS is
- loaded (via CONFIG.SYS).
- Usage: AuxMsg(<cMsg>,<lLF>)
- GCD() -- Greatest Common Divisor of two integers. Usually known as
- Euclid's Algorithm.
- Usage: GCD(<n1>,<n2>)
- RandSel() -- Random Selection of Integers. Note that version 1.1 users
- will need to make some minor changes to this routine.
- Usage: RandSel(<nN>,<nT>[,<cArray>[,<lReSeed>]])
- Bell() -- 'Plays' the bell.
- Usage: Bell()
- Alarm() -- As above, but with a "warble".
- Usage: Alarm([<nRings>][,<nDur>])
- GetPorts() -- Gets list of available printer ports.
- Usage: GetPorts()
- PortCheck -- Used with GetPorts() above. Adds a port to the list
- of available printer ports.
- E_Check -- Used with GetPorts() above. Checks for error after
- testing SET PRINTER TO ...
- IsSet() -- Checks if a bit (within a byte) is set to 1.
- Usage: IsSet(<cFlags>,<nWhich>)
-
- ------------------------------------------------------------------------
- PICKLIST.PRG -- "Generic" Picklist Routines
- ------------------------------------------------------------------------
- Pick1() -- Ken Holloway's generic picklist routine, allows user
- entering first letter of item, tab to another column,
- back tab, and so on. Pretty spiffy.
- Usage: Pick1(<cTitle>,<cDisplay>,<cReturn>,<cKey>,;
- <nFromRow>,<nFromCol>,<nToRow>,<nToCol>,;
- <cColor1>,<cColor2>)
- Pick2() -- This picklist routine creates a picklist that determines
- it's own location on the screen by calling a couple of
- other functions (below) (uses BROWSE command -- Malcom
- C. Rubel).
- Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>",;
- "<cRetFld>",<nScrRow>,<nScrCol>)
- ScrRow() -- Returns the row position of the current 'Get'. If the
- memvar nScrRow already exists, it returns the value in
- that memvar.
- Usage: ScrRow()
- ScrCol() -- Returns the column position of the current 'Get'. Works
- like above, but for column.
- Usage: ScrCol()
- Pick3 -- Martin Leon's DIYPOP routine.
- Usage: do Pick3 with <cFields>,<nULRow>,<nULCol>,;
- <nBRRow>,<nBRCol>,<cNormCol>,;
- <cFieldCol>,<cBorder>
- Pick4() -- Keith G. Chuvala's black-box picklist routine. This one's
- another rather spiffy routine. Includes selection of
- file, order and a "set key to" parameter, and ability to
- return value in the "normal" return manner, or to
- keyboard into a field.
- Usage: Pick4(<nRow>,<nCol>,<cTitle>,<cFileSpecs>,;
- <cListWhat>,<nRetChar>,<nReturnType>,;
- <cColors>)
- PopList() -- Used to replace the @M picture clause, use with a VALID
- REQUIRED clause. Can handle up to 9 parameters.
- Usage: PopList(<cOpt1>,<cOpt2>,...<cOpt9>)
- Diacrit -- Used to "keyboard" letters with diacritical marks
- directly into a field or memvar on screen, without
- requiring you memorize those dreary ASCII Codes.
- REQUIRES USE OF LocPop() below.
- Usage: on key label <keydef> do diacrit [with <cColor>]
- LocPop() -- Used to set upper left corner coordinates for a popup
- based on current "GET", used with WHEN clause of a get.
- Usage: LocPop(<nWidth>,<nLength>)
-
- ------------------------------------------------------------------------
- SCA.PRG -- SCA Date Handling Routines
- ------------------------------------------------------------------------
- SCA_Real -- Special purpose for SCA (Society for Creative
- Anachronism), brings up a window, enter date in SCA
- dates, converts to "real" dates (dBASE format).
- Usage: do SCA_Real
- SCA2Real() -- This function works like SCA_Real, without the user-
- input.
- Usage: SCA2Real(<cDay>,<cMonth>,<cYear>)
- && cyear=Roman Numeral
- Real_SCA() -- Used to convert 'real' (dBASE format) dates into SCA
- dates. (see SCA_Real Procedure above)
- Usage: Real_SCA(<dDate>)
-
- ------------------------------------------------------------------------
- FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
- ------------------------------------------------------------------------
- SetRand -- Procedure used to set a random # table, based on the time
- it is called, multiplied by the seconds at that moment.
- Useful for calling before using any of routines below.
- Used ONCE in a dBASE session, should be enough. The
- reason for this procedure is that I have found that
- using RAND(-1) often returns exactly the same values if
- the exact same function call (i.e., Dice() below) is
- made several times. This doesn't, therefore, do what I
- want. By using the current TIME, I can get a different
- random number table each time.
- Use EITHER this function OR RAND(-1) during any one
- session of dBASE.
- Usage: Do SetRand
- Dice() -- Used to simulate the roll of a dice, will handle
- different types of dice (for FRPG type games, where
- you have 4,6,8,10,12,20,100 sided dice ...)
- Usage: Dice(<nSides>)
- MultDice() -- As above but for multiple die (more than one).
- Usage: MultDice(<nNum>,<nSides>)
- ValiDice() -- Asks a gamer to enter a valid die roll, GM/Programmer
- specifies # of dice, number of sides ... (i.e., 3d6 is 3
- six-sided dice, if GM says: 3,6 the program will ask for
- a value from 3 to 18, and not allow any other input).
- Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
- DiceChoose()-- Presents three choices (in menu format) for gamer to use,
- die dice rolls ...
- Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>",;
- "<cColor>")
- ParseDice() -- Used to parse character field/memvar for xdy+z format
- of dice (a standard gaming format) and evaluate the
- value. I.e., 3d6+1 = 3 six-sided dice, +1 for each die
- rolled, giving a range from 6 to 21 -- function will
- return random number in that range (actually "rolling"
- 3 six-sided dice, adding 1 in example).
- Usage: ParseDice("<cDiceString>")
- PopDice -- Used to popup a place the user can enter a quick die
- roll, and have the computer do the actual dice rolling.
- Handy little routine ...
- Usage: do PopDice with <cColor>
- Example: ON KEY LABEL ALT-D DO POPDICE WITH;
- "rg+/rg,w+/n,rg+/rg"
-
- ------------------------------------------------------------------------
- WINDOWS.PRG -- People are beginning to want things that look like
- MicroSoft Windows. Here are routines that do some of that.
- ------------------------------------------------------------------------
- Alert() -- A popup with an "OK" pad, designed to force the user to
- acknowledge the message.
- Usage: Alert("<cTitle>","<cMessage>")
- CheckBox() -- One line message, with a check box to change the status
- of a logical memvar.
- Usage: CheckBox(<lVar>,"<cTitle>",<nRow>,<nCol>,<nAscii>)
- CheckBx1() -- Same as above, but is programmed a bit differently.
- Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
- DropDown() -- Performs a picklist with an array, or a field in a
- database. Holds a choice in a holding area, allowing user
- to use that, or select something else.
- Usage: DropDown("<cType>","<cName>",[<nRow,[<nCol>,;
- [<nSize>]]])
- MSWind() -- Creates a window that acts like a "MS Windows" window, in
- that you can move it, enlarge it to full screen, and
- bring it back to its original size.
- Usage: MSWind(<nTop>,<nLeft>,<nLower>,<nRight>)
- Enlarge -- Routine used with MSWIND() above to enlarge the window.
- Usage: do Enlarge
- MoveWinU -- Routine used to Move the window (MSWIND()) up on the
- screen.
- Usage: do MoveWinU
- MoveWinD -- Same as above to move window (MSWIND()) down.
- Usage: do MoveWinD
- MSWinAct -- Used to perform action(s) inside the window (MSWIND()).
- This routine should be modified for each specific system.
- This one is just a sample ...
- Usage: do MSWinAct with <nTop>,<nLeft>
- RadioBut() -- Radio Button routine.
- Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,;
- <nAscii>)
- TmpRadio -- Used to set/reset temporary array aTmpRadio used with
- RadioBut() routine above.
- Usage: Do TmpRadio
- ScrolBar() -- Performs a horizontal scroll-bar to find a record in a
- database file.
- Usage: ScrolBar(<nAtLine>)
- MSWind2() -- Acts like above, but title (due to a ... feature ... of
- dBASE IV version 1.5) does not display if enlarged.
- Usage: MsWind2(<nTop>,<nLeft>,<nLower>,<nRight>,;
- "<cColor>","<cTitle>")
- Enlarge2 -- Used with MSWind2() to enlarge to full-screen.
- Usage: do Enlarge2 with cTitle, cTitlCol
- MoveWind -- Used with MSWind2() to move the window.
- Usage: do MoveWin with <pPad>
- MSWinAt2 -- Used to perform an action inside the window from
- MSWind2().
- Usage: do MSWinAt2
- FieldNum() -- Used to return the number of a given fieldname in the
- database structure. Works only on an open database.
- Usage: FieldNum("<cFldName>")
- Alert3() -- An enhanced version of Alert2() in PROC.PRG
- Usage: Alert3("<cTitle>","<cMessage>","<cColor>")
- YesNo3() -- A version of YESNO() that deals with a message of up to
- 254 characters.
- Usage: YesNo3(<lDefault>,<cTitle>,<cMessage>,<cColor>)
-
- ------------------------------------------------------------------------
- DIALOGS.PRG -- A library of dialog-box routines -- most of these are
- routines from other sections of the library. Many of those will be
- removed in the next release from their current resting places, as they
- will reside here. Routines like SHADOW, and the color-handling routines
- are stored in this file as well.
- ------------------------------------------------------------------------
- Message1() -- Displays a single-line message, waits for user to press a
- key before program moves on.
- Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
- Message2() -- Same as above, but displays message in a window (with
- shadow).
- Usage: Message2("<cText>","<cColor>")
- Message3() -- Same as above, but will handle LONG messages, wrapping
- inside window.
- Usage: Message3("<cText>","<cColor>")
- Message4() -- 2-Line message in a window, pauses for user.
- Usage: Message4("<cText1>","<cText2>","<cColor>")
- ScrnHead() -- Used to display a screen header inside a box (with a
- shadow).
- Usage: ScrnHead("<cColor>","<cText>")
- ScrnHead2() -- Based on ScrnHead() above, uses 3-D effects. NOTE: Adds
- one row to used area of screen (start screens at row 6,
- not row 5).
- Usage: ScrnHead2(<cColor>,<cText>[,<nStyle>])
- ScrnHead3() -- Similar to #2 above, but gives four options for border.
- For first two options, it is identical as ScrnHead2(),
- for other two, it is same size as original Scrnhead().
- (IN PROC.PRG this is SCRNHEAD() )
- Default color = grey, default style = 1
- Usage: ScrnHead3(<cColor>,<cText>[,<nStyle>])
- YesNo() -- Used to ask a "yes/no" type question, allows three lines
- of message, and uses menu pads to choose (move cursor,
- press <enter>).
- Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
- "<cColors>")
- YesNo2() -- As above, but allows programmer to choose position on
- screen.
- Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>",;
- "<cMess2>","<cMess3>","<cColors>")
- where cWhere may be one of the following:
- UL = Upper Left
- UC = Upper Center
- UR = Upper Right
- CL = Center Left
- CC = Center Center
- CR = Center Right
- BL = Bottom Left
- BC = Bottom Center
- BR = Bottom Right
- Anything else will default to CC.
- YesNo3() -- A version of YESNO() that deals with a message of up to
- 254 characters.
- Usage: YesNo3(<lDefault>,<cTitle>,<cMessage>,<cColor>)
- YesNo4() -- Based on YesNo2() above, gives 3-D effect.
- Usage: YesNo4(<lAnswer>,"<cWhere>","<cMess1>",;
- "<cMess2>","<cMess3>","<cColors>";
- [,<nStyle>])
- YesNo5() -- Based on YesNo3() in WINDOWS.PRG, will wrap a long
- message inside the dialog box. Gives same 3-D effect as
- above.
- Usage: YesNo5(<lAnswer>,<cTitle>,<cMessage>,;
- <cColor>[,<nStyle>])
- YesNo6() -- Based on YesNo3() and YesNo5(), this will allow the
- programmer to define location, border type, colors, _and_
- has defaults for all of these (color defaults to steel-
- grey appearance). ( IN PROC.PRG, this is YESNO() )
- Usage: YesNo6(<lAnswer>,<cWhere>,<cTitle>,<cMessage>,;
- <cColor>,<nStyle>)
- YesNoCan() -- A dialog box, defaults to 'Yes/No/Cancel', varies in
- size, depending on programmer needs, optional row
- position. Nice modification of the YESNO() function in
- PROC.PRG.
- Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>",;
- "<cMess3>","<cPrompt1>","<cPrompt2>",;
- "<cPrompt3>",<nTopRow>,"<cColor>";
- [,<lConfirm>])
- YNC() -- Yes/No/Cancel dialog box, much as YesNo() above, but with
- three buttons. Due to differences, parameter passed and
- return value are character, rather than logical.
- Usage: YNC(<cDefault>,<cWhere>,<cTitle>,<cMessage>,;
- <cColor>[,<nStyle>])
- Dialog() -- Routine to provide a 'standard' set of dialog boxes and
- buttons for all applications.
- Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,;
- <lShadow>,"<cWind>","<cButton>")
- nType is used to describe the dialog box type, options
- are:
- 0: 'OK'
- 1: 'OK' 'CANCEL'
- 2: 'ABORT' 'RETRY' 'IGNORE'
- 3: 'YES' 'NO' 'CANCEL'
- 4: 'YES' 'NO'
- 5: 'RETRY' 'CANCEL'
- Dialog2() -- Similar to above, but also similar to YNC() further
- above. Allows the program to give a dialog box with the
- following options (below USAGE) line. Defaults to grey,
- defaults to center of the screen, border defaults to 3-d
- border style1.
- Usage: Dialog2(<nDefault>,<nType>,<cWhere>,<cTitle>,;
- <cMessage>,;
- <cColor>[,<nStyle>[,<cButton1>,;
- <cButton2>,<cButton3>]])
- nDefault is the pad to start at
- nType is used to describe the dialog box type:
- 1: 'OK' 'Cancel'
- 2: 'Abort' 'Retry' 'Ignore'
- 3: 'Retry' 'Cancel'
- 4: User defined, use optional parameters for button text.
- Pass two or three button titles to the routine -- if
- using three, it's best to keep the text to 6 char or
- less, if two, use up to 10 or so ...
- ErrorMsg() -- Allows 2 lines of message, first is ** ERROR **, or
- optionally, ** ERROR # ** where '#' is a number (if
- "<cErr>" is empty (""), system uses first option, but
- there must be SOMETHING there).
- Usage: ErrorMsg(<cErr>,<cMess1>,<cMess2>,<cColors>)
- ErrorMsg2() -- Based on ErrorMsg(), gives 3-D effects (as above).
- Usage: ErrorMsg(<cError#>,<cMess1>,<cMess2>,<cColor>;
- [,<nStyle>])
- ErrorMsg3() -- Three-D border, centers automatically on any size screen,
- message up to 254 characters, default = grey, border
- default to style 1.
- (IN PROC.PRG this is ERRORMSG() )
- Usage: ErrorMsg3(<cError#>,<cMess>[,<cColor>[,<nStyle>]])
- Alert() -- A popup with an "OK" pad, designed to force the user to
- acknowledge the message.
- Usage: Alert("<cTitle>","<cMessage>")
- Alert2() -- Brings up an "Alert" dialog box (similar to Windows).
- Usage: Alert2("<cTitle>","<cMessage>","<cColor>";
- [,"<cBorder>"])
- Alert3() -- An enhanced version of Alert2() in PROC.PRG
- Usage: Alert3("<cTitle>","<cMessage>","<cColor>")
- Alert4() -- An Alert box. Gives same 3-D effect as above.
- Usage: Alert4(<cTitle>,<cMessage>,<cColors>[,<nStyle>])
- Alert5() -- As above, four different 3-D border effects, defaults to
- grey, defaults to border style 1, handles multiple height
- screens (EGA43, VGA50 ...), message can be 254
- characters.
- (IN PROC.PRG this is ALERT() )
- Usage: Alert5(<cTitle>,<cMessage>,<cColors>[,<nStyle>])
- Surround2() -- Based on Surround() (PROC.PRG), centers text at row
- automatically, and gives 3-D effects. Adds shadow as
- well.
- Usage: Surround2(<nRow>,<cColor>,<cText>[,<nStyle>])
- Surround3() -- Based on Surround2(), centers text at nRow
- automatically, gives four 3-D border effects and shadow.
- (IN PROC.PRG this is SURROUND() )
- Usage: Surround3(<nRow>,<cColor>,<cText>[,<nStyle>])
- Radio() -- This routine creates a "radio-button" routine. You can
- have up to four options. Returns # of item chosen ...
- Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>",;
- "<cTxt2>", "<cTxt3>","<cTxt4>","<cTitle>",;
- "<cColor>")
- CheckBox -- This routine does a "CheckBox" much like Windows/Mac type
- software, with up to four options. NOTE -- the items
- marked in the format must be a) logical, and b)
- fields/memvars.
- Usage: Do CheckBox with <nULRow>,<nULCol>,<cTitle>,;
- <cColor>,<lChk1>,<cTxt1>;
- [,<lChk2>,<cTxt2>];
- [,<lChk3>,<cTxt3>] ... to 9
- CheckBox2() -- One line message, with a check box to change the status
- of a logical memvar.
- Usage: CheckBox2(<lVar>,"<cTitle>",<nRow>,<nCol>,;
- <nAscii>)
- CheckBx1() -- Same as above, but is programmed a bit differently.
- Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
- MultiPick -- Used for a checkbox routine, using a two-column array.
- REQUIRES: JPMOUSE.BIN,MUSCLICK.BIN,VDCURSOR.BIN
- Usage: do MultiPick with <cArray>,<nDown>,<nLast>,;
- <nRows>,<nLength>[,<cColors>;
- [,<cCheck>]]
- RadioBut() -- Radio Button routine.
- Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,;
- <nAscii>)
- TmpRadio -- Used to set/reset temporary array aTmpRadio used with
- RadioBut() routine above.
- Usage: Do TmpRadio
- SMultPick -- Subroutine of MultiPick -- used to handle a display loop.
- Usage: doSMultPick
- YesQuit() -- Subroutine for MultiPick.
- Usage: YesQuit()
- YNMouse() -- Mouseable Yes/No Dialog Box. REQUIRES MUSCLICK.BIN
- Usage: YnMouse(<cColors>,<cP1>[,<cP2>...][,<lYes>])
- CWnSize() -- Returns a string of four characters (chr() values) +1 for
- the coordinates of the current window/screen.
- REQUIRES: VDCURSOR.BIN
- Usage: cWnSize()
- nWBSrch() -- Subroutine for cWnSize() above.
- CWnDecode() -- Used to return numeric values based on CWNSIZE() above.
- Usage: cWnDecode(<cWnString>,<cEdge>|<nPos>)
- Bord3D -- Creates 3-D border in a window with no "border" (i.e.,
- border NONE). (Used in above three routines) (Styles:
- 1 = raised, 2 = inset)
- Usage: Do Bord3D with <nHeight>,<nWidth>,<cColor>,;
- <nStyle>
- Bord3D2 -- Creates 3-D border in an area on screen created with FILL
- commands. Used in 3-D scrnhead2() and others.
- Usage: Do Bord3D2 with <nTop>,<nLeft>,<nBottom>,;
- <nRight>,<cColor>,<nStyle>
- Bord3D3 -- Creates 3-D border in a window with no "border" (i.e.,
- border NONE). (Used in above three routines) (Styles: 1
- = raised, 2 = inset) This is the "Single-Line" version of
- BORD3D found in PROC.PRG.
- Usage: Do Bord3D3 with <nHeight>,<nWidth>,<cColor>,;
- <nStyle>
- Bord3D4 -- Creates 3-D border in an area on screen created with FILL
- commands. This is the "Single-Line" version of BORD3D2
- found in PROC.PRG. This one is useful for creating
- raised or inset areas in a dialog box ...
- Usage: Do Bord3D4 with <nTop>,<nLeft>,<nBottom>,;
- <nRight>,<cColor>,<nStyle>
- Bord3D5 -- Creates 3-D border, as original and 3, but all four
- options are included in this one.
- (IN PROC.PRG this is BORD3D)
- Usage: Do Bord3D5 with <nTop>,<nLeft>,<nBottom>,;
- <nRight>,<cColor>,<nStyle>
- Bevel() -- Creates a border like BORD3d and BORD3d2.
- Usage: @<row>,<col> say Bevel(<nBottom>,<nRight>)
-
- ------------------------------------------------------------------------
- ERRLOG.PRG -- A program to hold error-handling routines for dBASE IV.
- ------------------------------------------------------------------------
- ErrorLog -- This is used to generate an errorlog for the programmer,
- giving much vital information about the system at the
- time a program bombed. It can print the screen to disk
- as well as to paper, and can send a Novell Netware
- message to the programmer as well. (If you use print
- screen to paper or disk, you will require the use of
- PRINTSCR.BIN and/or SCREEN.BIN.)
- Usage: Do ErrorLog with error(),lineno(),program(),
- alias(),memory()[,<lPrntScrn>;
- [,<lScrn2Disk>[,<cNetId>]]])
-
- ------------------------------------------------------------------------
- HELPROC.PRG -- A program to deal with programmer defined Help. This
- system requires the use of HELPER.DBF and HELPER.FMT. This is a "black
- box" routine. Please read the instructions in HELPROC.PRG before
- attempting use ...
- ------------------------------------------------------------------------
- Helper -- The actual HELP program, assigned to F1
- (ON KEY LABEL F1 DO HELPER)
- StrSrch -- Routine to perform a string search in the help
- information (HELPER.DBF). Uses HELPER.FMT to display
- information on screen.
-
- ------------------------------------------------------------------------
- LISTFILE.PRG -- A program written to display an ASCII Text File on the
- screen. It uses some of the low-level routines created by Adam Menkes,
- and a few odd things I threw together (Ken Mayer). It is completely
- self-contained, and may be copied to any directory and used ... file
- size read in may vary -- when using versions < 2.0 of dBASE IV, the
- max number of lines that can be read in is about 1170. In 2.0 and
- greater, the real limit is the diskspace you have available, but the
- practical limit is around 5000 lines ... you can change this if you
- want to. You can do a search for text in this as well ...
- USAGE: Do ListFile with <cFileName>,<nRow>,<nHeight>[,<nTabs>;
- [,<cColors>]]
- ------------------------------------------------------------------------
-
- ------------------------------------------------------------------------
- OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV,
- 1.5 (or later versions), or other reasons, are no longer necessary.
- However, if you are a user of 1.1, and/or wish to still use these
- functions, they are still available, but with little support.
- ------------------------------------------------------------------------
- Empty() -- Returns a logical (.t. or .f.) if a field or memvar is
- empty. In release 1.5 this is replaced with the internal
- function ISBLANK().
- Usage: Empty(<cField>)
- Recommendation: If creating a system that uses both
- dBASE IV versions 1.5 and earlier versions, rename this
- function to ISBLANK(). If the system is an earlier
- version of dBASE, this function will be used, and if 1.5
- or later, the internal function will be used.
- NumFlds() -- Counts the fields in a given database. This is replaced
- in version 1.5 of dBASE IV with FLDCOUNT().
- Usage: NumFlds(<cDBF>)
- DateSet() -- Returns a string giving name of current DATE format.
- Usage: DateSet()
- StampVal() -- Evaluates a 16-character string in the form of the
- rightmost 16 characters returned by the DOS DIR command
- for a file.
- Usage: StampVal(<cTimeStamp>)
- FullWin -- Handy to overlay a screen with a full-screen window ...
- However, by using SAVE SCREEN and then clearing the
- screen, you can restore to the original with RESTORE
- SCREEN, making this routine a bit useless.
- Usage: do FullWin with "<cColor>","<cWinName>",;
- "<cScreen>"
- SetColor -- used to set a memory file with colors, or load colors
- into memory variables from a memory file.
- Usage: do SetColor
- SetColor2 -- used to set a mem file as above, but asks for a parameter
- to be sent, so that when designing a system, you can ask
- the user if their monitor is color or mono ... you pass
- "Y" or "N" ... i.e.,
- Usage: do SetColor2 with "<cYN>"
- ExtrClr() -- Used to extract the first parameter of a color memory
- variable.
- Usage: ExtrClr(<cColorVar>)
- InvClr() -- Can invert the colors of a color memory variable.
- Usage: InvClr(<cColorVar>)
- RAt() -- Reverse AT() - returns position of a character string in
- its last position in a larger string ... Replaced in
- Version 2.0 with internal function: RAt().
- Usage: RAt(<cFindStr>,<cBigStr>)
- IsMouse() -- Looks at system for a mouse driver, if there, it turns
- off the mouse. Uses JPMOUSE.BIN. Replaced in Version 2.0
- with the internal function: ISMOUSE().
- Usage: IsMouse()
- SetMouse -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
- memvar c_Mouse set to the most current state ("OFF" means
- the mouse is "OFF" ... and will be toggled ON in the next
- call to SetMouse). Replaced in Version 2.0 with SET MOUSE
- ON|OFF.
- Usage: On Key label ... DO SetMouse
- IsUnique() -- Used to check a keyfield in a database to see if it's
- unique.
- NOTE: do not use in dBASE IV, versions > 1.1
- Usage: IsUnique(<xValue>,<cOrder>)
- DateSet() -- Returns string giving name of current DATE format.
- Not needed in 1.5 or later.
- Usage: DateSet()
-
- ------------------------------------------------------------------------
- -- EoF: INDEX.TXT
- ------------------------------------------------------------------------